package com.situ.onlinebookstore.common.mapper;

import com.situ.onlinebookstore.common.entity.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

//@Mapper和@MapperScan有一个就行
public interface CategoryMapper {
    //增
    int insert(Category category);
    //改
    int update(Category category);
    //根据ID查
    Category selectById(Integer id);
    //根据名字查
    Category selectByName(String name);
//    //根据一级分类查询二级分类
//    List<Category> selectParentId(Integer parentId);
    //多条件查询
    List<Map<String,Object>> select(Category category);

}
